package pl.edu.agh.jemo.conf.types;

import java.util.ArrayList;
import java.util.List;

import pl.edu.agh.jemo.evolution.operator.mutation.Mutation;
import pl.edu.agh.jemo.evolution.operator.mutation.impl.BalancedMutation;
import pl.edu.agh.jemo.evolution.operator.mutation.impl.ClassicMutation;
import pl.edu.agh.jemo.evolution.operator.mutation.impl.EmptyMutation;
import pl.edu.agh.jemo.evolution.operator.mutation.impl.Hillclimbing;

/**
 * Class dedicated to list all available mutation types.
 * It is used by user interface, in order to help user choosing a mutation to be used by algorithm.
 * 
 * @author Marcin.Zbijowski
 *
 */
public class MutationTypesHandler {
	
	/**
	 * Returns collection of all available implemented mutations in jemo.
	 * Returned object is java.util.List, containing references to classes being implementation of Mutation interface.
	 * This method should be updated when adding new mutation operators.
	 * 
	 * @return List of objects representing classes of available mutations
	 */
	public static List<PrintableType<? extends Mutation>> getMutationTypes() {
		List<PrintableType<? extends Mutation>> classes = new ArrayList<PrintableType<? extends Mutation>>();
		classes.add(new PrintableType<BalancedMutation>(BalancedMutation.class, "Balanced mutation"));
		classes.add(new PrintableType<ClassicMutation>(ClassicMutation.class, "Classic mutation"));
		classes.add(new PrintableType<EmptyMutation>(EmptyMutation.class, "Empty mutation"));
		classes.add(new PrintableType<Hillclimbing>(Hillclimbing.class, "Hillclimbing"));
		return classes;
	}

}
